<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NoticeBar 通知栏</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .head-nav{
            display: flex;
            justify-content: space-between;
            padding: 10px;
            border-bottom: 1px solid #EEF0F4;
        }
        body{
            background: #F9F9FB;
        }
        img{
            width: 100%;
        }

        .notice{
            display: flex;
            justify-content: space-between;
            height: 40px;
            line-height: 40px;
            background: #FFFBE8;
            color: #ed6a0c;
            padding: 0px 15px;
        }
        .notice .icon{
            width: 30px;
            text-align: center;
        }
        .notice .text{
            width: 100%;
            overflow-x: scroll;
            position: relative;
        }
        .notice .text span{
            font-size: 14px;
            position: absolute;
            white-space: nowrap;
            animation: first 20s infinite linear;
        }

        .notice .text::-webkit-scrollbar,
        .notice .text2::-webkit-scrollbar { /* 隐藏滚动条 */
            display: none;
        }
        @keyframes first
        {
            from {transform: translateX(380px);}
            to {transform: translateX(-380px);}
        }


        .notice .text2{
            width: 100%;
            overflow-y: scroll;
            position: relative;
            margin: 10px 0px;
            line-height: 20px;
        }
        .notice .text2 div{
            font-size: 14px;
            position: absolute;
            white-space: nowrap;
            animation: first2 6s infinite;
        }
        @keyframes first2
        {
            0% {transform: translateY(20px);}

            30% {transform: translateY(0px);}
            40% {transform: translateY(0px);}
            50% {transform: translateY(0px);}
            60% {transform: translateY(0px);}
            70% {transform: translateY(0px);}

            100% {transform: translateY(-20px);}
        }

    </style>
</head>
<body>
    <div class="head-nav">
        <div onclick="history.go(-1)">《</div>
        <div>NoticeBar 通知栏</div>
        <div></div>
    </div>

    <div class="list">

        <div style="margin: 30px 20px 10px">基本用法</div>
        <div class="notice">
            <div class="icon">《</div>
            <div class="text">
                <span>一个基于 jQuery 的框架，集成了各种用户界面插件。</span>
            </div>
        </div>

        <div style="margin: 30px 20px 10px">滚动播放</div>
        <div class="notice">
            <div class="text">
                <span>一个基于 jQuery 的框架，集成了各种用户界面插件。</span>
            </div>
        </div>

        <div style="margin: 30px 20px 10px">通知栏模式</div>
        <div class="notice">
            <div class="text">
                <span>一个基于 jQuery 的框架，集成了各种用户界面插件。</span>
            </div>
            <div class="icon">x</div>
        </div>

        <div class="notice">
            <div class="text">
                <span>一个基于 jQuery 的框架，集成了各种用户界面插件。</span>
            </div>
            <div class="icon">></div>
        </div>

        
        <div style="margin: 30px 20px 10px">垂直滚动</div>
        <div class="notice">
            <div class="text2">
                <div>
                    <p>一个基于 jQuery 的框架</p>
                    <p>集成了各种用户界面插件</p>
                </div>
            </div>
            <div class="icon">></div>
        </div>
        
    </div>
</body>
</html>